Skip to content

Conversation

@jishnub
Copy link
Member

@jishnub jishnub commented Apr 27, 2025

Currently, we use a helper function _conjugation that produces transpose for Symmetric and adjoint for Hermitian. In this PR, we change this to produce transpose for real Hermitian matrices as well, as these should be equivalent. This improves the TTSX (time to second run) of applytri, as the function does not need to be recompiled.

julia> using LinearAlgebra

julia> A = [1 2; 3 4];

julia> S = Symmetric(A);

julia> @time S + S; # first run
  0.282624 seconds (608.83 k allocations: 31.942 MiB, 99.98% compilation time) # nightly 
  0.285233 seconds (608.83 k allocations: 31.925 MiB, 99.98% compilation time) # this PR

julia> H = Hermitian(A);

julia> @time H + H; # second run
  0.197709 seconds (309.42 k allocations: 16.395 MiB, 6.39% gc time, 99.97% compilation time) # nightly
  0.063034 seconds (48.90 k allocations: 2.900 MiB, 99.91% compilation time) # this PR

@codecov
Copy link

codecov bot commented Apr 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.72%. Comparing base (6e8f9a1) to head (74230ae).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1319      +/-   ##
==========================================
+ Coverage   93.70%   93.72%   +0.01%     
==========================================
  Files          34       34              
  Lines       15734    15734              
==========================================
+ Hits        14744    14747       +3     
+ Misses        990      987       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jishnub jishnub merged commit d15de4d into master Apr 28, 2025
4 checks passed
@jishnub jishnub deleted the jishnub/symhermconjugation branch April 28, 2025 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants